//package com.zscat.mall.portal.service.impl;
//
//
//import com.zscat.mall.portal.entity.MemberReadHistory;
//import com.zscat.mall.portal.repository.MemberReadHistoryRepository;
//import com.zscat.mall.portal.service.MemberReadHistoryService;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//
///**
// * 会员浏览记录管理Service实现类
// * Created by zscat on 2018/8/3.
// */
//@Service
//public class MemberReadHistoryServiceImpl implements MemberReadHistoryService {
//    @Resource
//    private MemberReadHistoryRepository memberReadHistoryRepository;
//
//    @Override
//    public int create(MemberReadHistory memberReadHistory) {
//        memberReadHistory.setId(null);
//        memberReadHistory.setCreateTime(new Date());
//        memberReadHistoryRepository.save(memberReadHistory);
//        return 1;
//    }
//
//    @Override
//    public int delete(List<String> ids) {
//        List<MemberReadHistory> deleteList = new ArrayList<>();
//        for (String id : ids) {
//            MemberReadHistory memberReadHistory = new MemberReadHistory();
//            memberReadHistory.setId(id);
//            deleteList.add(memberReadHistory);
//        }
//        memberReadHistoryRepository.delete(deleteList);
//        return ids.size();
//    }
//
//    @Override
//    public List<MemberReadHistory> list(Long memberId) {
//        return memberReadHistoryRepository.findByMemberIdOrderByCreateTimeDesc(memberId);
//    }
//}
